From 64e128629f2bcc2668b733b8ec8c11d94982c66e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Mar 2018 21:30:31 +0100 Subject: [PATCH] magnifier: Clip child node to magnifier size It's still broken in several other ways, but now one less. --- gtk/gtkmagnifier.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/gtkmagnifier.c b/gtk/gtkmagnifier.c index 875342a463..c69b3cbdee 100644 --- a/gtk/gtkmagnifier.c +++ b/gtk/gtkmagnifier.c @@ -125,12 +125,20 @@ gtk_magnifier_snapshot (GtkWidget *widget, if (inspected_node != NULL) { + gtk_snapshot_push_clip (snapshot, + &GRAPHENE_RECT_INIT (0, 0, + gtk_widget_get_width (widget), + gtk_widget_get_height (widget)), + "MagnifierClip"); + graphene_matrix_init_identity (&transform); graphene_matrix_scale (&transform, priv->magnification, priv->magnification, 1); gtk_snapshot_push_transform (snapshot, &transform, "Magnifier transform"); gtk_snapshot_append_node (snapshot, inspected_node); gtk_snapshot_pop (snapshot); + + gtk_snapshot_pop (snapshot); } -- 2.30.2